<!DOCTYPE html>
<html lang="zh-CN" dir="ltr">
    <head><meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'><meta name='description' content='scp scp节约资源，系统负荷小，但断点续传是个问题 scp scp [OPTION] SRC DEST 常用参数： -r：递归拷贝目录 -q：不显示进度 -l：限制传输带宽，单位是kbits/'>
<title>rsync</title>

<link rel='canonical' href='/p/rsync/'>

<link rel="stylesheet" href="/scss/style.min.56b4b4efdee21dd7cd9a6ec6cdb1882f71985765df9c7591a90716c58b48f4c5.css"><meta property='og:title' content='rsync'>
<meta property='og:description' content='scp scp节约资源，系统负荷小，但断点续传是个问题 scp scp [OPTION] SRC DEST 常用参数： -r：递归拷贝目录 -q：不显示进度 -l：限制传输带宽，单位是kbits/'>
<meta property='og:url' content='/p/rsync/'>
<meta property='og:site_name' content='良宏'>
<meta property='og:type' content='article'><meta property='article:section' content='Post' /><meta property='article:tag' content='scp' /><meta property='article:tag' content='rsync' /><meta property='article:published_time' content='2022-03-20T02:04:17&#43;08:00'/><meta property='article:modified_time' content='2022-03-20T02:04:17&#43;08:00'/>
<meta name="twitter:title" content="rsync">
<meta name="twitter:description" content="scp scp节约资源，系统负荷小，但断点续传是个问题 scp scp [OPTION] SRC DEST 常用参数： -r：递归拷贝目录 -q：不显示进度 -l：限制传输带宽，单位是kbits/">
    </head>
    <body class="
    article-page
    ">
    <script>
        (function() {
            const colorSchemeKey = 'StackColorScheme';
            if(!localStorage.getItem(colorSchemeKey)){
                localStorage.setItem(colorSchemeKey, "auto");
            }
        })();
    </script><script>
    (function() {
        const colorSchemeKey = 'StackColorScheme';
        const colorSchemeItem = localStorage.getItem(colorSchemeKey);
        const supportDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches === true;

        if (colorSchemeItem == 'dark' || colorSchemeItem === 'auto' && supportDarkMode) {
            

            document.documentElement.dataset.scheme = 'dark';
        } else {
            document.documentElement.dataset.scheme = 'light';
        }
    })();
</script>
<div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky ">
    <button class="hamburger hamburger--spin" type="button" id="toggle-menu" aria-label="切换菜单">
        <span class="hamburger-box">
            <span class="hamburger-inner"></span>
        </span>
    </button>

    <header>
        
            
            <figure class="site-avatar">
                <a href="/">
                
                    
                    
                    
                        
                        <img src="/img/wx_150x150_hub08581134c092243b209205c3073808c_6075_300x0_resize_q75_box.jpeg" width="300"
                            height="300" class="site-logo" loading="lazy" alt="Avatar">
                    
                
                </a>
                
                    <span class="emoji">🍥</span>
                
            </figure>
            
        
        
        <div class="site-meta">
            <h1 class="site-name"><a href="/">良宏</a></h1>
            <h2 class="site-description">好好学习，天天向上。</h2>
        </div>
    </header><ol class="menu" id="main-menu">
        
        
        
        <li >
            <a href='/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <polyline points="5 12 3 12 12 3 21 12 19 12" />
  <path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" />
  <path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" />
</svg>



                
                <span>Home</span>
            </a>
        </li>
        
        
        <li >
            <a href='/about/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="12" cy="7" r="4" />
  <path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
</svg>



                
                <span>About</span>
            </a>
        </li>
        
        
        <li >
            <a href='/archives/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <rect x="3" y="4" width="18" height="4" rx="2" />
  <path d="M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10" />
  <line x1="10" y1="12" x2="14" y2="12" />
</svg>



                
                <span>Archives</span>
            </a>
        </li>
        
        
        <li >
            <a href='/search/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="10" cy="10" r="7" />
  <line x1="21" y1="21" x2="15" y2="15" />
</svg>



                
                <span>Search</span>
            </a>
        </li>
        

        <div class="menu-bottom-section">
            
            
                <li id="dark-mode-toggle">
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="8" cy="12" r="2" />
  <rect x="2" y="6" width="20" height="12" rx="6" />
</svg>



                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="16" cy="12" r="2" />
  <rect x="2" y="6" width="20" height="12" rx="6" />
</svg>



                    <span>暗色模式</span>
                </li>
            
        </div>
    </ol>
</aside>

    

            <main class="main full-width">
    <article class="main-article">
    <header class="article-header">

    <div class="article-details">
    
    <header class="article-category">
        
            <a href="/categories/tech/" style="background-color: blueviolet; color: #fff;">
                Tech
            </a>
        
            <a href="/categories/command/" style="background-color: brown; color: #fff;">
                Command
            </a>
        
            <a href="/categories/tool/" style="background-color: #0177b8; color: #fff;">
                Tool
            </a>
        
    </header>
    

    <div class="article-title-wrapper">
        <h2 class="article-title">
            <a href="/p/rsync/">rsync</a>
        </h2>
    
        
    </div>

    
    
    
    
    <footer class="article-time">
        
            <div>
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <path d="M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4" />
  <circle cx="18" cy="18" r="4" />
  <path d="M15 3v4" />
  <path d="M7 3v4" />
  <path d="M3 11h16" />
  <path d="M18 16.496v1.504l1 1" />
</svg>
                <time class="article-time--published">Mar 20, 2022</time>
            </div>
        

        
            <div>
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="12" cy="12" r="9" />
  <polyline points="12 7 12 12 15 15" />
</svg>



                <time class="article-time--reading">
                    阅读时长: 5 分钟
                </time>
            </div>
        
    </footer>
    

    
</div>

</header>

    <section class="article-content">
    
    
    <h2 id="scp">scp</h2>
<p>scp节约资源，系统负荷小，但断点续传是个问题</p>
<pre tabindex="0"><code>scp
scp [OPTION] SRC DEST
常用参数：
-r：递归拷贝目录
-q：不显示进度
-l：限制传输带宽，单位是kbits/s
</code></pre><p>示例</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">scp -r -l <span class="m">200</span> path/to/dir user@192.168.1.1:/home/user/
</span></span></code></pre></div><h2 id="rsync">rsync</h2>
<p>scp 是通过ssh协议传输数据，如果是想传输一个很大的数据，有可能遇到服务器断电什么的悲剧问题，类似scp拷贝的另一个命令 rsync就可以实现意外中断后，下次继续传</p>
<p>rsync速度更快，断点续传方便，但系统负荷大，尤其是传输很多文件的时候，硬盘I/O非常高。</p>
<blockquote>
<p>注意，传输的双方都必须安装 rsync
安装</p>
</blockquote>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Debian</span>
</span></span><span class="line"><span class="cl">$ sudo apt-get install rsync
</span></span><span class="line"><span class="cl"><span class="c1"># Red Hat</span>
</span></span><span class="line"><span class="cl">$ sudo yum install rsync
</span></span><span class="line"><span class="cl"><span class="c1"># Arch Linux</span>
</span></span><span class="line"><span class="cl">$ sudo pacman -S rsync
</span></span></code></pre></div><p>参数说明</p>
<pre tabindex="0"><code>rsync
rsync [OPTION] SRC DEST
常用参数：
-b、--backup：参数指定在删除或更新目标目录已经存在的文件时，将该文件更名后进行备份，默认行为是删除。更名规则是添加由--suffix参数指定的文件后缀名，默认是~
--progress： 显示拷贝进度
--partial：保留不完整文件，实现断点续传
--partial-dir=DIR：指定不完整文件的存储目录，而不是默认存储到目的地目录，比如--partial-dir=.rsync-partial。一般需要与--append或--append-verify配合使用。
-P：包含--progress和--partial
--rsh=ssh：使用ssh方式传输文件，注意：如果之前设置过ssh免密码登录，那么此时也就不需要密码了，非常方便
-v：-v参数表示输出细节。-vv表示输出更详细的信息，-vvv表示输出最详细的信息。
-a：归档模式。也就是以递归方式传输文件，并保持所有文件属性。
--append：参数指定文件接着上次中断的地方，继续传输。
--append-verify：参数跟--append参数类似，但会对传输完成后的文件进行一次校验。如果校验失败，将重新发送整个文件。
-z ：传输时进行压缩提高效率。
--bwlimit参数指定带宽限制，默认单位是 KB/s，比如--bwlimit=100
-c、--checksum参数改变rsync的校验方式。默认情况下，rsync 只检查文件的大小和最后修改日期是否发生变化，如果发生变化，就重新传输；使用这个参数以后，则通过判断文件内容的校验和，决定是否重新传输。
-i参数表示输出源目录与目标目录之间文件差异的详细情况。
--existing、--ignore-non-existing参数表示不同步目标目录中不存在的文件和目录。
--ignore-existing参数表示只要该文件在目标目录中已经存在，就跳过去，不再同步这些文件。
-u、--update参数表示同步时跳过目标目录中修改时间更新的文件，即不同步这些有更新的时间戳的文件。
-r：递归方式传输文件
--remove-source-files：参数表示传输成功后，删除发送方的文件。
-n：-n或--dry-run参数模拟执行的结果，不真的执行
--delete：默认只保证复制到，不保证相同所以不删除，添加此参数会删除不存在于源的内容，进而保证一致
--link-dest：参数用来指定同步时的基准目录
--size-only：参数表示只同步大小有变化的文件，不考虑文件修改时间的差异。
--port ：连接daemon时使用的端口号，默认为873端口。
--password-file ：daemon模式时的密码文件，可以从中读取密码实现非交互式。注意，这不是远程shell认证的密码，而是rsync模块认证的密码。
</code></pre><p>示例</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rsync -P --rsh<span class="o">=</span>ssh home.tar user@192.168.1.2:/home/
</span></span><span class="line"><span class="cl">rsync -P --rsh<span class="o">=</span>ssh user@192.168.1.2:/home/test.tar.gz /root
</span></span><span class="line"><span class="cl"><span class="c1"># -P: 是包含了 “–partial –progress”， 部分传送和显示进度</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 省略参数的写法 alias scpr=&#34;rsync -P --rsh=ssh&#34;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># scpr home.tar 192.168.205.34:/home/home.tar</span>
</span></span><span class="line"><span class="cl">rsync -a <span class="nb">source</span> destination <span class="c1"># 复制目录</span>
</span></span><span class="line"><span class="cl">rsync -a source/ destination <span class="c1"># 复制目录的内容</span>
</span></span><span class="line"><span class="cl">rsync -anv source/ destination <span class="c1"># 模拟执行</span>
</span></span><span class="line"><span class="cl">rsync -av --delete source/ destination <span class="c1"># 保证完全一致，删除多余文件</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 早期 rsync 不使用 SSH 协议，需要用-e参数指定协议</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 现在 下面的 -e ssh可以省略</span>
</span></span><span class="line"><span class="cl">rsync -av -e ssh source/ user@remote_host:/destination
</span></span><span class="line"><span class="cl"><span class="c1"># 操作当前目录并排除部分目录</span>
</span></span><span class="line"><span class="cl">rsync -ave ssh <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  --exclude .git <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  --exclude dist <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  . <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  user@192.168.1.1:~/person/dev/
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">rsync -av --include<span class="o">=</span><span class="s2">&#34;*.txt&#34;</span> --exclude<span class="o">=</span><span class="s1">&#39;*&#39;</span> source/ destination <span class="c1"># 排除所有文件，只同步 txt 文件</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">rsync -av -e <span class="s1">&#39;ssh -p 2234&#39;</span> source/ user@remote_host:/destination <span class="c1"># -e 参数指定使用 2234 端口</span>
</span></span></code></pre></div><h2 id="jumphost">JumpHost</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Upload</span>
</span></span><span class="line"><span class="cl">scp -oProxyCommand<span class="o">=</span><span class="s2">&#34;ssh -W %h:%p JUMP_HOST&#34;</span> FILE_TO_SEND DEST_HOST:/home/gareth/
</span></span><span class="line"><span class="cl"><span class="c1"># Download</span>
</span></span><span class="line"><span class="cl">scp -oProxyCommand<span class="o">=</span><span class="s2">&#34;ssh -W %h:%p JUMP_HOST&#34;</span> DEST_HOST:FILE_TO_DOWNLOAD ~/Downloads/
</span></span><span class="line"><span class="cl"><span class="c1"># Upload</span>
</span></span><span class="line"><span class="cl">rsync -av -e <span class="s2">&#34;ssh -A JUMP_HOST ssh&#34;</span> FILE_TO_SEND DEST_HOST:/home/gareth/
</span></span><span class="line"><span class="cl"><span class="c1"># Download</span>
</span></span><span class="line"><span class="cl">rsync -av -e <span class="s2">&#34;ssh -A JUMP_HOST ssh&#34;</span> DEST_HOST:~/FILE_TO_DOWNLOAD ~/Downloads/
</span></span><span class="line"><span class="cl"><span class="c1"># file copy line: serverC(file) -&gt; serverB -&gt; serverA</span>
</span></span><span class="line"><span class="cl">rsync -avzhP -e <span class="s2">&#34;ssh -p portB -A user1@serverB ssh&#34;</span> user2@serverC:somedir/ localdir/
</span></span></code></pre></div><h2 id="rsync-协议">rsync 协议</h2>
<p>除了使用 SSH，如果另一台服务器安装并运行了 rsync 守护程序，则也可以用rsync://协议（默认端口873）进行传输。具体写法是服务器与目标目录之间使用双冒号分隔::。</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rsync -av source/ 192.168.122.32::module/destination
</span></span><span class="line"><span class="cl"><span class="c1"># 地址中的module并不是实际路径名，而是 rsync 守护程序指定的一个资源名，由管理员分配。</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">rsync rsync://192.168.122.32
</span></span><span class="line"><span class="cl"><span class="c1"># 列出rsync 守护程序分配的所有 module 列表</span>
</span></span><span class="line"><span class="cl">rsync -av source/ rsync://192.168.122.32/module/destination
</span></span><span class="line"><span class="cl"><span class="c1"># rsync 协议除了使用双冒号，也可以直接用rsync://协议指定地址</span>
</span></span></code></pre></div><h2 id="增量备份">增量备份</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rsync -a --delete --link-dest /compare/path /source/path /target/path
</span></span></code></pre></div><p>增量备份脚本</p>
<blockquote>
<p>每一次同步都会生成一个新目录${BACKUP_DIR}/${DATETIME}，并将软链接${BACKUP_DIR}/latest指向这个目录。下一次备份时，就将${BACKUP_DIR}/latest作为基准目录，生成新的备份目录。最后，再将软链接${BACKUP_DIR}/latest指向新的备份目录。</p>
</blockquote>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/bin/bash
</span></span></span><span class="line"><span class="cl"><span class="cp"></span>
</span></span><span class="line"><span class="cl"><span class="c1"># A script to perform incremental backups using rsync</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">set</span> -o errexit
</span></span><span class="line"><span class="cl"><span class="nb">set</span> -o nounset
</span></span><span class="line"><span class="cl"><span class="nb">set</span> -o pipefail
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">readonly</span> <span class="nv">SOURCE_DIR</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">${</span><span class="nv">HOME</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">readonly</span> <span class="nv">BACKUP_DIR</span><span class="o">=</span><span class="s2">&#34;/mnt/data/backups&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">readonly</span> <span class="nv">DATETIME</span><span class="o">=</span><span class="s2">&#34;</span><span class="k">$(</span>date <span class="s1">&#39;+%Y-%m-%d_%H:%M:%S&#39;</span><span class="k">)</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">readonly</span> <span class="nv">BACKUP_PATH</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">${</span><span class="nv">BACKUP_DIR</span><span class="si">}</span><span class="s2">/</span><span class="si">${</span><span class="nv">DATETIME</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">readonly</span> <span class="nv">LATEST_LINK</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">${</span><span class="nv">BACKUP_DIR</span><span class="si">}</span><span class="s2">/latest&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">mkdir -p <span class="s2">&#34;</span><span class="si">${</span><span class="nv">BACKUP_DIR</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">rsync -av --delete <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="s2">&#34;</span><span class="si">${</span><span class="nv">SOURCE_DIR</span><span class="si">}</span><span class="s2">/&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  --link-dest <span class="s2">&#34;</span><span class="si">${</span><span class="nv">LATEST_LINK</span><span class="si">}</span><span class="s2">&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  --exclude<span class="o">=</span><span class="s2">&#34;.cache&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>  <span class="s2">&#34;</span><span class="si">${</span><span class="nv">BACKUP_PATH</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">rm -rf <span class="s2">&#34;</span><span class="si">${</span><span class="nv">LATEST_LINK</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">ln -s <span class="s2">&#34;</span><span class="si">${</span><span class="nv">BACKUP_PATH</span><span class="si">}</span><span class="s2">&#34;</span> <span class="s2">&#34;</span><span class="si">${</span><span class="nv">LATEST_LINK</span><span class="si">}</span><span class="s2">&#34;</span>
</span></span></code></pre></div>
</section>


    <footer class="article-footer">
    
    <section class="article-tags">
        
            <a href="/tags/scp/">scp</a>
        
            <a href="/tags/rsync/">rsync</a>
        
    </section>


    </footer>


    
</article>

    

    

<aside class="related-content--wrapper">
    <h2 class="section-title">相关文章</h2>
    <div class="related-content">
        <div class="flex article-list--tile">
            
                
<article class="">
    <a href="/p/readline/">
        
        

        <div class="article-details">
            <h2 class="article-title">readline</h2>
        </div>
    </a>
</article>

            
                
<article class="">
    <a href="/p/direnv/">
        
        

        <div class="article-details">
            <h2 class="article-title">direnv</h2>
        </div>
    </a>
</article>

            
                
<article class="">
    <a href="/p/fdleak/">
        
        

        <div class="article-details">
            <h2 class="article-title">fdleak</h2>
        </div>
    </a>
</article>

            
                
<article class="">
    <a href="/p/ssh-into-termux/">
        
        

        <div class="article-details">
            <h2 class="article-title">ssh into termux</h2>
        </div>
    </a>
</article>

            
                
<article class="">
    <a href="/p/custom-linux-live/">
        
        

        <div class="article-details">
            <h2 class="article-title">custom linux live</h2>
        </div>
    </a>
</article>

            
        </div>
    </div>
</aside>

     
    
        
    

    <footer class="site-footer">
    <section class="copyright">
        &copy; 
        
            2021 - 
        
        2023 良宏
    </section>
    <section class="powerby">
        Built with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a>,
        主题 <b><a href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener" data-version="3.5.0">Stack</a></b> 由 <a href="https://jimmycai.com" target="_blank" rel="noopener">Jimmy</a> 设计
    </section>
</footer>


    
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    
    <div class="pswp__bg"></div>

    
    <div class="pswp__scroll-wrap">

        
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                
                
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div><script 
                src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo="crossorigin="anonymous"
                defer
                >
            </script><script 
                src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU="crossorigin="anonymous"
                defer
                >
            </script><link 
                rel="stylesheet" 
                href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css"crossorigin="anonymous"
            ><link 
                rel="stylesheet" 
                href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css"crossorigin="anonymous"
            >

            </main>
        </div>
        <script 
                src="https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js"integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z&#43;KMkF24hUW8WePSA9HM="crossorigin="anonymous"
                
                >
            </script><script type="text/javascript" src="/ts/main.js" defer></script><script type="text/javascript" src="/ts/custom.js" defer></script>
<script>
    (function () {
        const customFont = document.createElement('link');
        customFont.href = "https://fonts.font.im/css2?family=Lato:wght@300;400;700&display=swap";

        customFont.type = "text/css";
        customFont.rel = "stylesheet";

        
    }());
</script>


    </body>
</html>
